﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

/// <summary>
/// Summary description for PageBase
/// </summary>
public class PageBase : System.Web.UI.Page
{
    public string Uid { get; set; }

    private static char[] sp = { '\\' };
    private static char[] sp2 = { '|' };
    private static List<string> admins = System.Configuration.ConfigurationManager.AppSettings["Admins"].Split(sp2).ToList();

    public bool IsAdmin
    {
        get
        {
            return admins.Contains(Uid);
        }
    }

	public PageBase()
	{
        this.Uid = User.Identity.Name.ToString().Split(sp)[1];
	}
}
